import os

import yamail,pytest
def yjian(f):
    ma=yamail.SMTP(user='1391277593@qq.com',password='npphtjsegwjqhiae',host='smtp.qq.com')
    ma.send(to='1391277593@qq.com',subject='-16苗召洋',contents='测试报告请查收',attachments=f)
if __name__ == '__main__':
    pytest.main(['./cases/test_wddy.py','--alluredir=allure'])
    os.system('allure generate allure -o min --clean')
    pytest.main(['./cases/test_wddy.py','--html=min.html'])
    yjian(['min.html','index.html'])